package com.zengqingfa.springboot.validation.demo.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @fileName: CreateUserDto
 * @author: zengqf3
 * @date: 2020-10-6 19:02
 * @description:
 */
@Data
public class CreateUserDto {

    private Long userId;

    @NotEmpty(message = "用户名称不能为空")
    @Length(min = 2, max = 10)
    private String userName;

    @Valid
    private List<Job> jobList;

}
